package day05;

public class homework3_2 {
    public static void main(String[] args) {
        /*
        int[] arr=new int[5];
        int[] arr1=new int[10];
        int[] arr2={1,2,3,4,5,6};
        int[] arr3;
        arr3=new int[]{1,4,7,2,5,8,3,6,9};


         */
        int[] arr=new int[5];
        System.out.println(arr.length);
        arr[0]=10;
        arr[1]=20;
        arr[2]=30;
        arr[3]=40;
        arr[4]=50;
        System.out.println(arr[arr.length-1]);

        System.out.println("\n遍历:");
        int[] arr1=new int[5];
        for(int i=0;i< arr1.length;i++){
            arr1[i] = (int)(Math.random()*100+1);
            System.out.println(arr1[i]);
        }


    }
}
